package com.xcb.spring.demo;

import com.xcb.spring.aop.AspectJAwareAdvisorAutoProxyCreator;
import com.xcb.spring.beans.BeanPostProcessor;
import com.xcb.spring.context.AnnotationConfigApplicationContext;
import com.xcb.spring.demo.service.OrderService;

import java.util.List;
import java.util.Map;

public class Test {

    public static void main(String[] args) throws Exception {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class,new AspectJAwareAdvisorAutoProxyCreator());
        OrderService orderService = (OrderService) applicationContext.getBean("orderService");
        List<Map<String, Object>> orders = orderService.getOrders();
        System.out.println(orders);
    }
}
